package bookshop.dao;

import java.util.List;

import bookshop.domain.CustComment;
import bookshop.service.helper.CustCommentQueryHelper;

public interface CustCommentDao {
	
	//添加图书评论信息
	void AddCustCommet(CustComment comment);
	
	//根据用户ID取得用户总共评论的次数
	Long countCommentByCustId(String custId);
	
	//根据图书ID算出图书的mark平均分
	Integer avgMarkByBookCode(String bookCode);
	
	//根据组合查询查询相应的评论信息
	List<CustComment> getScopedComments(CustCommentQueryHelper helper, int startIndex,
			int fetchSize);
	
	//根据查询条件统计评论信息总数
	Long countCommentsByCondition(CustCommentQueryHelper helper);
	
	
	//根据查询条件查询相应的评论
	List<CustComment> getCustCommentByCondition(CustCommentQueryHelper helper);

	
	//根据id删除评论信息
	void delCustCommentById(Integer id);
	
	//根据ID取出评论信息
	CustComment getCustCommentById(Integer id);
	
	//根据用户ID取出评论信息
	List<CustComment> getCustCommentByCustId(CustCommentQueryHelper helper);
}
